import request from "@/utils/request";

// 获取盘点计划下拉列表
export function getPlanList() {
	return request({
		url: "/operation/web/report/planList",
		method: "get",
	});
}

// 查询盘点报告列表
export function listInventoryReport(params) {
	return request({
		url: "/operation/web/report/list",
		method: "get",
		params,
	});
}

// 获取盘点报告详细信息
export function getInventoryReportDetail(id) {
	return request({
		url: `/operation/web/report/${id}`,
		method: "get",
	});
}

// 新增盘点报告
export function addInventoryReport(data) {
	return request({
		url: "/operation/web/report",
		method: "post",
		data,
	});
}

// 修改盘点报告
export function updateInventoryReport(data) {
	return request({
		url: "/operation/web/report",
		method: "put",
		data,
	});
}

// 删除盘点报告
export function deleteInventoryReport(ids) {
	return request({
		url: `/operation/web/report/${ids}`,
		method: "delete",
	});
}

// 审核盘点报告
export function auditInventoryReport(data) {
	return request({
		url: "/operation/web/report/audit",
		method: "post",
		data,
	});
}

// 导出盘点报告
export function exportInventoryReport(data) {
	return request({
		url: "/operation/web/report/export",
		method: "post",
		data,
	});
}
